]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
A11yStatus: ignore an user default of O dpi
authorGiovanni Campagna <gcampagna@src.gnome.org>
Mon, 17 Jan 2011 18:11:11 +0000 (19:11 +0100)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Wed, 23 Feb 2011 19:10:44 +0000 (20:10 +0100)
The default for the DPI setting is 0, but 0 * any scaling factor
is 0, so we need to deal with that, by falling back to X default.

https://bugzilla.gnome.org/show_bug.cgi?id=639762

js/ui/status/accessibility.js

index af503706fb0964b40fdcf7aa87d5d28d27334bbc..035e96e166bec16209832e7004a813dea84563bc 100644 (file)
@@ -205,7 +205,7 @@ ATIndicator.prototype = {
             return (user_value - (DPI_FACTOR_LARGE * x_value) > -1);
         }
         let initial_setting = on_get();
-        let default_value = initial_setting ? x_value : user_value;
+        let default_value = (initial_setting || user_value == 0) ? x_value : user_value;
         let widget = this._buildItemExtended(_("Large Text"),
             initial_setting,
             settings.is_writable(KEY_DPI),
@@ -217,7 +217,7 @@ ATIndicator.prototype = {
             });
         settings.connect('changed::' + KEY_DPI, function() {
             let active = on_get();
-            default_value = active ? x_value : user_value;
+            default_value = (active || user_value == 0) ? x_value : user_value;
             widget.setToggleState(active);
         });
         return widget;